home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / src / image.h < prev    next >
C/C++ Source or Header  |  1999-02-04  |  3KB  |  113 lines

  1. /* $Id: image.h,v 3.4 1998/08/21 02:41:39 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: image.h,v $
  26.  * Revision 3.4  1998/08/21 02:41:39  brianp
  27.  * added gl_pack/unpack_polygon_stipple()
  28.  *
  29.  * Revision 3.3  1998/07/26 17:24:18  brianp
  30.  * replaced const with CONST because of IRIX cc warning
  31.  *
  32.  * Revision 3.2  1998/07/17 03:24:53  brianp
  33.  * added gl_pack_rgba_span()
  34.  *
  35.  * Revision 3.1  1998/02/08 20:21:22  brianp
  36.  * added gl_unpack_bitmap()
  37.  *
  38.  * Revision 3.0  1998/01/31 20:54:19  brianp
  39.  * initial rev
  40.  *
  41.  */
  42.  
  43.  
  44. #ifndef IMAGE_H
  45. #define IMAGE_H
  46.  
  47.  
  48. #include "types.h"
  49.  
  50.  
  51. extern void gl_flip_bytes( GLubyte *p, GLuint n );
  52.  
  53.  
  54. extern void gl_swap2( GLushort *p, GLuint n );
  55.  
  56. extern void gl_swap4( GLuint *p, GLuint n );
  57.  
  58.  
  59. extern GLint gl_sizeof_type( GLenum type );
  60.  
  61.  
  62. extern GLint gl_components_in_format( GLenum format );
  63.  
  64.  
  65. extern GLvoid *gl_pixel_addr_in_image(
  66.                                 const struct gl_pixelstore_attrib *packing,
  67.                                 const GLvoid *image, GLsizei width,
  68.                                 GLsizei height, GLenum format, GLenum type,
  69.                                 GLint img, GLint row, GLint column );
  70.  
  71.  
  72. extern struct gl_image *gl_unpack_bitmap( GLcontext *ctx,
  73.                                           GLsizei width, GLsizei height,
  74.                                           const GLubyte *bitmap );
  75.  
  76.  
  77. extern void gl_unpack_polygon_stipple( const GLcontext *ctx,
  78.                                        const GLubyte *pattern,
  79.                                        GLuint dest[32] );
  80.  
  81.  
  82. extern void gl_pack_polygon_stipple( const GLcontext *ctx,
  83.                                      const GLuint pattern[32],
  84.                                      GLubyte *dest );
  85.  
  86.  
  87. extern struct gl_image *gl_unpack_image( GLcontext *ctx,
  88.                                   GLint width, GLint height,
  89.                                   GLenum srcFormat, GLenum srcType,
  90.                                   const GLvoid *pixels );
  91.  
  92.  
  93. struct gl_image *gl_unpack_image3D( GLcontext *ctx,
  94.                                     GLint width, GLint height,GLint depth,
  95.                                     GLenum srcFormat, GLenum srcType,
  96.                                     const GLvoid *pixels );
  97.  
  98.  
  99. extern void gl_pack_rgba_span( const GLcontext *ctx,
  100.                                GLuint n, CONST GLubyte rgba[][4],
  101.                                GLenum format, GLenum type, GLvoid *dest);
  102.  
  103.  
  104. extern void gl_free_image( struct gl_image *image );
  105.  
  106.  
  107. extern GLboolean gl_image_error_test( GLcontext *ctx,
  108.                                       const struct gl_image *image,
  109.                                       const char *msg );
  110.  
  111.  
  112. #endif
  113.